-
Notifications
You must be signed in to change notification settings - Fork 3k
missing includes for filesystem.cpp (build with VisualGDB fails) #4994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When building with VisualGDB the compilation fails due to the lack of required include files Dir.h and File.h. Compiler report: 1>------ Build started: Project: exported-mbed-STM32F429-nucleo, Configuration: Debug VisualGDB ------ 1> FileSystem.cpp 1> mbed-os/features/filesystem/FileSystem.cpp: In instantiation of 'class Managed<mbed::File>': 1> mbed-os\features\filesystem\FileSystem.cpp(141,19): note : required from here 1>mbed-os\features\filesystem\FileSystem.cpp(130,7): error : invalid use of incomplete type 'class mbed::File' 1> class Managed : public F { 1> ^~~~~~~ 1> mbed-os\features\filesystem\FileSystem.cpp(18): 1> mbed-os\features\filesystem\FileSystem.h(39,7): note : forward declaration of 'class mbed::File' 1> class File; 1> ^~~~ 1> mbed-os/features/filesystem/FileSystem.cpp: In member function 'virtual int mbed::FileSystem::open(mbed::FileHandle**, const char*, int)': 1>mbed-os\features\filesystem\FileSystem.cpp(141,19): error : cannot convert 'Managed<mbed::File>*' to 'mbed::File*' in initialization 1> File *f = new Managed<File>; 1> ^~~~~~~~~~~~~ 1>mbed-os\features\filesystem\FileSystem.cpp(142,16): error : invalid use of incomplete type 'class mbed::File' 1> int err = f->open(this, path, flags); 1> ^~ 1> mbed-os\features\filesystem\FileSystem.cpp(18): 1> mbed-os\features\filesystem\FileSystem.h(39,7): note : forward declaration of 'class mbed::File' 1> class File; 1> ^~~~ 1>mbed-os\features\filesystem\FileSystem.cpp(144,16): warning : possible problem detected in invocation of delete operator: [-Wdelete-incomplete] 1> delete f; 1> ^ 1>mbed-os\features\filesystem\FileSystem.cpp(141,11): warning : 'f' has incomplete type 1> File *f = new Managed<File>; 1> ^ 1> mbed-os\features\filesystem\FileSystem.cpp(18): 1> mbed-os\features\filesystem\FileSystem.h(39,7): note : forward declaration of 'class mbed::File' 1> class File; 1> ^~~~ 1> mbed-os\features\filesystem\FileSystem.cpp(144,16): note : neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined 1> delete f; 1> ^ 1>mbed-os\features\filesystem\FileSystem.cpp(148,13): error : cannot convert 'mbed::File*' to 'mbed::FileHandle*' in assignment 1> *file = f; 1> ^ 1> mbed-os\features\filesystem\FileSystem.cpp(18): 1> mbed-os\features\filesystem\FileSystem.h(39,7): note : class type 'mbed::File' is incomplete 1> class File; 1> ^~~~ 1> mbed-os/features/filesystem/FileSystem.cpp: In instantiation of 'class Managed<mbed::Dir>': 1> mbed-os\features\filesystem\FileSystem.cpp(153,18): note : required from here 1>mbed-os\features\filesystem\FileSystem.cpp(130,7): error : invalid use of incomplete type 'class mbed::Dir' 1> class Managed : public F { 1> ^~~~~~~ 1> mbed-os\features\filesystem\FileSystem.cpp(18): 1> mbed-os\features\filesystem\FileSystem.h(38,7): note : forward declaration of 'class mbed::Dir' 1> class Dir; 1> ^~~ 1> mbed-os/features/filesystem/FileSystem.cpp: In member function 'virtual int mbed::FileSystem::open(mbed::DirHandle**, const char*)': 1>mbed-os\features\filesystem\FileSystem.cpp(153,18): error : cannot convert 'Managed<mbed::Dir>*' to 'mbed::Dir*' in initialization 1> Dir *d = new Managed<Dir>; 1> ^~~~~~~~~~~~ 1>mbed-os\features\filesystem\FileSystem.cpp(154,16): error : invalid use of incomplete type 'class mbed::Dir' 1> int err = d->open(this, path); 1> ^~ 1> mbed-os\features\filesystem\FileSystem.cpp(18): 1> mbed-os\features\filesystem\FileSystem.h(38,7): note : forward declaration of 'class mbed::Dir' 1> class Dir; 1> ^~~ 1>mbed-os\features\filesystem\FileSystem.cpp(156,16): warning : possible problem detected in invocation of delete operator: [-Wdelete-incomplete] 1> delete d; 1> ^ 1>mbed-os\features\filesystem\FileSystem.cpp(153,10): warning : 'd' has incomplete type 1> Dir *d = new Managed<Dir>; 1> ^ 1> mbed-os\features\filesystem\FileSystem.cpp(18): 1> mbed-os\features\filesystem\FileSystem.h(38,7): note : forward declaration of 'class mbed::Dir' 1> class Dir; 1> ^~~ 1> mbed-os\features\filesystem\FileSystem.cpp(156,16): note : neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined 1> delete d; 1> ^ 1>mbed-os\features\filesystem\FileSystem.cpp(160,12): error : cannot convert 'mbed::Dir*' to 'mbed::DirHandle*' in assignment 1> *dir = d; 1> ^ 1> mbed-os\features\filesystem\FileSystem.cpp(18): 1> mbed-os\features\filesystem\FileSystem.h(38,7): note : class type 'mbed::Dir' is incomplete 1> class Dir; 1> ^~~ 1> mbed-os/features/filesystem/FileSystem.cpp: In instantiation of 'int Managed<F>::close() [with F = mbed::Dir]': 1> mbed-os\features\filesystem\FileSystem.cpp(162,1): note : required from here 1>mbed-os\features\filesystem\FileSystem.cpp(133,27): error : incomplete type 'mbed::Dir' used in nested name specifier 1> int err = F::close(); 1> ~~~~~~~~^~ 1> mbed-os/features/filesystem/FileSystem.cpp: In instantiation of 'int Managed<F>::close() [with F = mbed::File]': 1> mbed-os\features\filesystem\FileSystem.cpp(162,1): note : required from here 1>mbed-os\features\filesystem\FileSystem.cpp(133,27): error : incomplete type 'mbed::File' used in nested name specifier ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
cc @geky |
0xc0170
approved these changes
Sep 4, 2017
/morph test |
geky
approved these changes
Sep 21, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange this hasn't been seen before, but can't hurt 👍
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When building mbed-os with the third-party tool VisualGDB, it fails compiling after an exported project has been imported.
Building the filesystem driver failed because the Managed class was missing two includes (invalid use of incomplete type 'class mbed::Dir' / invalid use of incomplete type 'class mbed::File')
Status
READY
Migrations
If this PR changes any APIs or behaviors, give a short description of what API users should do when this PR is merged.
NO
Steps to test or reproduce
Take exported package of Online Compiler, import it into VisualGDB and compile it.